<?php

require_once realpath (dirname (__FILE__)) . '//..//..//pages.php';
require_once CLASS_RECORD;

/**
 * Description of Intervento
 *
 * @author Andrea Cantafio
 */
class Intervento extends Record {

    public function __construct ($values) {
        $data = array ();
        if (is_array ($values)) {
            foreach ($values as $key => $value) {
                $add = true;
                switch ($key) {
                    case 'argomenti':
                    case 'data':
                    case 'durata':
                    case 'ID':
                    case 'IDtipo_intervento':
                    case 'giudizio':
                    case 'note':
                    case 'ora':
                        break;
                    default:
                        $add = false;
                }
                if ($add) {
                    $data[$key] = $value;
                }
            }
        }
        $this->required = array ('argomenti', 'giudizio');
        parent::__construct ('intervento', $data);
    }

}

?>